import request from '../../request';
import { AxiosResponse } from 'axios';
import { ResponseData } from '@/types/api/public';

type ConfigType<T=ResponseData> = Promise<AxiosResponse<T>>

/**
 * 获取数据
 * @param params 参数
 * @returns 分页数据
 */
export const save =(data:any):ConfigType =>{
    return request({
       url:'/api/v1/OnlineForm/Save',
       method:'post',
       data,   
       headers: {
        'Content-Type': 'application/json'
      } 
    })
}

export const getData =(params:any):ConfigType =>{
  return request({
     url:'/api/v1/OnlineForm/GetData',
     method:'get',
     params,   
     headers: {
      'Content-Type': 'application/json'
    } 
  })
}